package com.dy.cloud;

import com.dy.myrule.MyRibbonRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述) EnableEurekaClient:eureka客户端
 *                @SpringBootApplication(exclude = DataSourceAutoConfiguration.class):因为使用了Mybatis-plus依赖，所以会寻找数据源，
 *                因为我们是消费者，不需要数据源。
 *                @RibbonClient(name = "CLOUDPROVIDERPAYMENT",configuration = MyRibbonRule.class):自定义Ribbon负责均衡策略,
 *                name:要访问的服务名称，configuration:自定义负载均衡策略
 * @Date: 2021/9/3 14:17
 * @Version 1.0 (版本)
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableEurekaClient
@RibbonClient(name = "CLOUDPROVIDERPAYMENT",configuration = MyRibbonRule.class)
public class CloudConsumerOrder80 {
    public static void main(String[] args) {
        SpringApplication.run(CloudConsumerOrder80.class, args);
    }
}
